<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>心悦酒店管理系统(xinyue.com)-酒店预订、酒店查询、宾馆住宿预订</title>
    <!-- App favicon -->
    <link rel="shortcut icon" href="/assets/images/favicon.ico">

    <link href="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet">

    <!-- App css -->
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/icons.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/metismenu.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body data-typy="index">
    <div class="row" style="padding-left:30px;padding-right:30px;">
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold">
                    <span class="am-icon-list"></span> 用户数据
                </div>
                <div class="tpl-portlet-input tpl-fz-ml">
                    <div class="portlet-input input-small input-inline">
                        <div class="input-icon right">
                        </div>
                    </div>
                </div>

            </div>
            <div class="tpl-block ">
                <div class="am-g tpl-amazeui-form">
                    <div class="am-u-sm-12 am-u-md-12">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                                <tr>
                                    <th>账号</th>
                                    <th>电话</th>
                                    <th>邮箱</th>
                                    <th>qq</th>
                                    <th>联系地址</th>
                                    <th style="text-align:left;padding-left:10px;">用户类型</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr th:each="u : ${list}">
                                    <td th:text="${u.username }">
                                    </td>
                                    <td th:text="${u.tel }">
                                    </td>
                                    <td th:text="${u.email }">
                                    </td>
                                    <td th:text="${u.qq }">
                                    </td>
                                    <td th:text="${u.address }">
                                    </td>
                                    <td style="text-align:left;padding-left:10px;">
                                        <span class="badge badge-danger" th:if="${u.type==1}">用户</span>
                                        <span class="badge badge-warning" th:if="${u.grade==1 && u.type==1}">未通过会员申请</span>
                                        <a th:href="@{'/hotel/users/pass?grade=2&id=' + ${u.id}}" th:if="${u.type==1}">通过会员申请</a>
                                        <a th:href="@{'/hotel/users/pass?grade=1&id=' + ${u.id}}" th:if="${u.type==1}">不通过</a>
                                        <span class="badge badge-primary" th:if="${u.type==2}">会员</span>
                                        <span class="badge badge-success" th:if="${u.type==3}">管理员</span>
                                    </td>

                                    <td>
                                        <a th:href="@{'/hotel/users/profile/' + ${u.id}}">
                                            资料
                                        </a>
                                        |
                                        <a th:href="@{'/hotel/users/password/' + ${u.id}}">
                                            [密码重置]
                                        </a>
                                        |
                                        <a th:href="@{'/hotel/users/users/delete?id=' + ${u.id} + '&ret=list'}">
                                            [删除]
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>


                    </div>
                </div>
            </div>

        </div>
    </div>
    <!-- jQuery  -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/js/metisMenu.min.js"></script>
    <script src="/assets/js/waves.min.js"></script>
    <script src="/assets/js/jquery.slimscroll.min.js"></script>

    <script src="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
    <script src="/assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <script src="/assets/plugins/moment/moment.js"></script>
    <script src="/assets/plugins/apexcharts/apexcharts.min.js"></script>        
    <script src="/assets/pages/jquery.dashboard.init.js"></script>
    <!-- App js -->
    <script src="/assets/js/app.js"></script>
    <script src="/source/scripts/window.js"></script>
    <script src="/source/js.js"></script>
    <script>
        $().ready(function(){
            $(".uploadImg").click(function(){
                openWindow("/upload.jsp");
            });
            $("#thumb").on("input",function(){
                $(".oldImg").attr("src","/"+$("#thumb").val());
            });
        });
    </script>
</body>

</html>